package 成绩统计502;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int num=scanner.nextInt();
		int sum=0;	//及格率
		int tmp=0;	//优秀率
		for(int i=0;i<num;i++) {
			int cot=scanner.nextInt();
			if(cot>=60) {
				sum++;
			}
			if(cot>=85) {
				tmp++;
			}
		}
		System.out.println(Math.round(sum*100.0/num)+"%");
		System.out.println(Math.round(tmp*100.0/num)+"%");
	}
}
